﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchAnnounceUserControl.ascx.cs"
    Inherits="JM.JCY.SharePointComponent.Announcement.SearchAnnounce.SearchAnnounceUserControl" %>

<script type="text/javascript">

    $(document).ready(function () {



    });

    function RedirectToViewAnnounce(sender, AnnounceId) {
        sender.href = "ViewAnnounceDetail.aspx?AnnounceId=" + AnnounceId;
        return false;
    }
</script>
<style type="text/css">
    .ms-input /* Set textbox's width of dtEffDateFrom and dtEffDateTo */
    {
        width: 75px;
    }
    
    table.form td.nopaddingleft
    {
        padding-left: 0px;
        padding-top: 0px;
        vertical-align: top;
        font-family: Calibri;
        font-size: 12px;
    }
</style>
<div>
    <table class="main">
        <tr>
         
            <td valign="top" width="75%" runat="server" id="tdContent">
                <table class="content" width="98%">
                    <tr>
                        <td style="padding: 5px;">
                            <table width="100%" class="title">
                                <tr>
                                    <td width="60%">
                                        <h2 class="title"><img src="/_layouts/JM.JCY.Resource/images/broadcast_logo.png" width="32"/>
                                            搜索通知通告
                                        </h2>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <hr />
                            <table width="100%" class="form">
                                <tr>
                                    <td>
                                        主题
                                    </td>
                                    <td>
                                        :
                                    </td>
                                    <td>
                                        <asp:textbox id="txtSubject" runat="server">
                                        </asp:textbox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        发布时间
                                    </td>
                                    <td>
                                        :
                                    </td>
                                    <td class="nopaddingleft">
                                        <table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td align="left" valign="top" class="nopaddingleft">
                                                    <SharePoint:DateTimeControl ID="dtEffDateFrom" CalendarImageUrl="/_layouts/JM.JCY.Resource/images/calendar.jpg"
                                                        DatePickerFrameUrl="/_layouts/iframe.aspx" DateOnly="true" Calendar="Gregorian"
                                                        LocaleId="2052" runat="server"></SharePoint:DateTimeControl>
                                                </td>
                                                <td>
                                                    -
                                                </td>
                                                <td align="left" valign="top" class="nopaddingleft">
                                                    <SharePoint:DateTimeControl ID="dtEffDateTo" CalendarImageUrl="/_layouts/JM.JCY.Resource/images/calendar.jpg"
                                                        DatePickerFrameUrl="/_layouts/iframe.aspx" DateOnly="true" Calendar="Gregorian"
                                                        LocaleId="2052" runat="server"></SharePoint:DateTimeControl>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3" class="button">
                                        <asp:imagebutton id="imgSubmit" runat="server" 
                                            imageurl="~/_layouts/JM.JCY.Resource/images/search.png" 
                                            onclick="imgSubmit_Click" />
                                        <asp:imagebutton id="imgCancel" runat="server" 
                                            imageurl="~/_layouts/JM.JCY.Resource/images/cancel.png" 
                                            onclick="imgCancel_Click" />
                                    </td>
                                </tr>
                            </table>
                            <table width="100%" class="list">
                                <tr>
                                    <td>
                                        <div id="content">
                                            <asp:gridview id="gvBC" runat="server" autogeneratecolumns="False" borderwidth="0px"
                                                gridlines="Horizontal" cssclass="altrowstablebc" 
                                                OnRowDataBound="gvBC_DataBound"  Width="100%" EnableModelValidation="True">
                                                <columns>                                                 
                                                    <asp:TemplateField HeaderText="发布日期"> 
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblEffDate" runat="server" Text='<%# Eval("CREATED_TIME") %>'></asp:Label>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="15%" />
                                                        <ItemStyle Width="15%" />
                                                    </asp:TemplateField> 
                                                    
                                                    <asp:TemplateField HeaderText="主题">
                                                    <ItemTemplate>
                                                            <asp:LinkButton ID="lbSubject" runat="server" Text='<%#Eval("Subject")%>' OnClientClick='<%# String.Format("RedirectToViewAnnounce({0},{1})","this",Eval("ID")) %>'></asp:LinkButton>
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="25%" />
                                                        <ItemStyle Width="25%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="注意事项">    
                                                        <ItemTemplate> 
                                                            <asp:Label ID="lblContent" runat="server" Text='<%#Eval("Summary")%>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>      
                                                </columns>
                                            </asp:gridview>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            <br />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>